function snifferPlayList() {
    try {
        var json = [];
        var playlist = document.getElementById("playlist1");
        var msg = playlist.innerHTML;
        var alist = playlist.getElementsByTagName("a");
        for(var i = 0; i < alist.length; i++) {
            json.push({
                text: alist[i].innerText,
                href: alist[i].href
            });
        }
        const result = {
            location: document.location,
            dataList: json
        };
        const params = JSON.stringify(result);
//      console.log(params);
        window.JsBridge.callNative("onPlayListLoaded", params);
    } catch (error) {
        
    }
}

function snifferPlayInfo() {
    try {
        player_data.title = document.title;
        const result = JSON.stringify(player_data);
//      console.log(result);
        window.JsBridge.callNative("onPlayInfoLoaded", result);
    } catch (error) {
        
    }
}

function removeAds() {
    try {
        var childElements = document.body.children;
        for (var i = 0; i < childElements.length; i++) {
            var childElement = childElements[i];
            if (childElement.tagName.toLowerCase() === "div" && childElement.hasAttribute("id")) {
                document.body.removeChild(childElement);
            }
        }
    } catch (error) {
        
    }
}

